package com.eveinfo.display.asset;

import java.util.Comparator;

public class GroupComparator<E extends AssetComparable> implements Comparator<E> {

	@Override
	public int compare(E object1, E object2) {
		int groupID1 = object1.getGroupID();
		int groupID2 = object2.getGroupID();
		if(groupID1 < groupID2){
			return -1;
		}else if (groupID1 > groupID2) {
			return 1;
		}else {
			return object1.getTypeName().compareTo(object2.getTypeName());
		}
	}

}
